#include "CLayer.h"
#include "SGD Wrappers/CSGD_TextureManager.h"
#include "SGD Wrappers/CSGD_Direct3D.h"
#include "CTileManager.h"
#include "CTile.h"

CLayer::CLayer()
{

}

CLayer::~CLayer()
{

}

void CLayer::Init()
{

}

void CLayer::Shutdown()
{

}

void CLayer::Render()
{
	for(int x = 0; x < CTileManager::GetInstance()->MapWidth(); x++)
		for(int y = 0; y < CTileManager::GetInstance()->MapHeight(); y++)
		{
			CSGD_TextureManager::GetInstance()->Draw(
				CTileManager::GetInstance()->TileSetImage(),
				y * CTileManager::GetInstance()->TileHeight(), 
				x * CTileManager::GetInstance()->TileWidth(),  
				1,1,&m_vTiles[x + y * CTileManager::GetInstance()->MapWidth()]->DrawRect());
		}
}